/**
 * Created with JetBrains WebStorm.
 * User: Administrator
 * Date: 14-6-16
 * Time: 下午4:35
 * To change this template use File | Settings | File Templates.
 */
seajs.use(JS_PATH+"wd_tip",function(tip){
    new tip(".wd_tip")
});

seajs.use(JS_PATH+"wd_calendar",function(calendar){
    new calendar(".wd_date")
});

seajs.use(JS_PATH+"wd_tab",function(tab){
    new tab(".wd_tab")
});

seajs.use(JS_PATH+"wd_localStorage",function(localStorage){
    new localStorage(".wd_form",{
        onSave: function () {
            console.log('onSave');
        },
        onRestore: function () {
            console.log('Restore');
        },
        onRelease: function () {
            console.log('Release');
        }
    }).init()
});

seajs.use(JS_PATH+"wd_validate",function(validate){
    new validate("#add_lend")
});

seajs.use(JS_PATH+"wd_notify",function(notify){
    new notify(".wd_notify",{content:"删除成功"})
});

seajs.use(JS_PATH+"wd_dialog",function(dialog){
    new dialog(".wd_tiq",{
        title:"提示",
        content:"确定这个订单提前还款了吗？",
        sure:{
            btn:true,
            onSure:function(){
                this.elem.parents('tr').remove();
                this.close();
            }
        }
    });
    new dialog(".wd_delete",{
        title:"提示",
        content:"确定删除此条记录吗？",
        sure:{
            btn:true,
            onSure:function(){
                this.elem.parents('tr').remove();
                this.close();
            }
        }
    })
});



seajs.use(JS_PATH+"wd_hotRoller",function(hotRoller){
    new hotRoller("#hotRoller")
});

seajs.use(JS_PATH+"wd_fixed",function(fixed){
    new fixed("body",{
        onUnstick:function(){
            $("#wd_content").css("padding-top","0")
        },onStick:function(){
            $("#wd_content").css("padding-top","70px")
        }
    })
});

seajs.use(JS_PATH+"wd_autoEmail",function(autoEmail){
    new autoEmail(".wd_autoEmail")
});


seajs.use(JS_PATH+"wd_scrollTop",function(scrollTop){
    new scrollTop()
});

seajs.use(JS_PATH+"wd_dropDown",function(dropdown){
    new dropdown(".wd_dropDown")
})